import os
import time

from selenium.webdriver.common.by import By

from base.Base1 import Base1

class Page_TuShu(Base1):
    # Tushu_url=os.getenv('base_url')
    #获取搜索框的定位
    search_loc=(By.CLASS_NAME,'form-control')
    search_btn_loc=(By.ID,'searchButton')
    #封装搜索框的方法
    def search(self):
        self.send_keys(self.search_loc,'三国演义')
    def search_btn(self):
        self.click(self.search_btn_loc)
    #图书搜索的逻辑
    def TuShu_Luoji(self):
        # self.open_url(self.Tushu_url)
        self.search()
        self.search_btn()
        time.sleep(5)

#这是第三周周考